/*
 * @description: OSS存储桶
 * @Date: 2023-02-21 15:26:36
 * @example:
 * @params:
 */
import OSS from "ali-oss";

export const Client = () => {
  const client = new OSS({
    region: "oss-cn-hangzhou",
    accessKeyId: "LTAI5tFnDNyHFJABFj7pRcgy",
    accessKeySecret: "mWsduPIvBo7bRaMGqVxfri0atiPeR2",
    bucket: "kai-zhang",
  });
  return client;
};
/**
 * 生成随机uuid
 */
export const getFileNameUUID = () => {
  function rx() {
    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
  }
  return `${+new Date()}_${rx()}${rx()}`;
};
